{template "content","header"}
<!--UE4.net提示：如内容中有代码展示部分，须加入以下三行代码高亮前端样式和JS,负责前端代码高亮效果-->
<link href="{JS_PATH}ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" rel="stylesheet" type="text/css" />
<script src="{JS_PATH}ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<script>SyntaxHighlighter.all();</script>
<!--代码高亮结束-->
<div class="main">
    <div class="col-left">
        <div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> &gt; </span>{catpos($catid)} 正文</div>
        <div id="Article">
            <h1>{$title}<br />
                <span>{$inputtime}&nbsp;&nbsp;&nbsp;来源：{$copyfrom}&nbsp;&nbsp;&nbsp;评论：<a href="#comment_iframe" id="comment">0</a> 点击：</span><span id="hits"></span></h1>
            {if $description}<div class="summary" >{$description}</div>{/if}
            <div class="content" id="conform">
                {if $allow_visitor==1}
                {$content}
                <!--内容关联投票-->
                {if $voteid}<script src="{APP_PATH}index.php?m=vote&c=index&a=show&action=js&subjectid={$voteid}&type=2"></script>{/if}
                {else}
                <CENTER><a href="{APP_PATH}index.php?m=content&c=readpoint&allow_visitor={$allow_visitor}"><font color="red">阅读此信息需要您支付 <B><I>{$readpoint} {if $paytype}元{else}点{/if}</I></B>，点击这里支付</font></a></CENTER>
                {/if}
            </div>
            {if $titles}
            <fieldset>
                <legend class="f14">本文导航</legend><ul class="list blue row-2">
                {loop $titles $r}
                <li>{$n}、<a href="{$r[url]}">{$r[title]}</a></li>
                {/loop}
            </ul>
            </fieldset>
            {/if}
            <div id="pages" class="text-c">{$pages}</div>
            <p style="margin-bottom:10px">
                <strong>相关热词搜索：</strong>{loop $keywords $keyword}<a href="{APP_PATH}index.php?m=content&c=tag&a=lists&tag={urlencode($keyword)}" class="blue">{$keyword}</a> 	{/loop}
            </p>
            <p class="f14">
                <strong>上一篇：</strong><a href="{$previous_page[url]}">{$previous_page[title]}</a><br />
                <strong>下一篇：</strong><a href="{$next_page[url]}">{$next_page[title]}</a>
            </p>
            {pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" keywords="$rs[keywords]"}
            {if $data}
            <div class="related">
                <h5 class="blue">延伸阅读：</h5>
                <ul class="list blue lh24 f14">
                    {loop $data $r}
                    <li>·<a href="{$r[url]}" target="_blank">{$r[title]}</a><span>({date('Y-m-d',$r[inputtime])})</span></li>
                    {/loop}
                </ul>
            </div>
            {/if}
            {/pc}
            <div class="bk15"></div>
            {if module_exists('mood')}<script type="text/javascript" src="{APP_PATH}index.php?m=mood&c=index&a=init&id={id_encode($catid,$id,$siteid)}"></script>{/if}
        </div>
        <div class="Article-Tool">
            分享到：
            <img src="http://v.t.qq.com/share/images/s/weiboicon16.png" style="padding-bottom:3px;" onclick="postToWb();" class="cu" title="分享到腾讯微博"/><script type="text/javascript">
            function postToWb(){
                var _t = encodeURI(document.title);
                var _url = encodeURIComponent(document.location);
                var _appkey = encodeURI("cba3558104094dbaa4148d8caa436a0b");
                var _pic = encodeURI('{$thumb}');
                var _site = '';
                var _u = 'http://v.t.qq.com/share/share.php?url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic+'&title='+_t;
                window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
            }
        </script>
            <script>document.write('<a href="http://v.t.sina.com.cn/share/share.php?url='+encodeURIComponent(location.href)+'&appkey=3172366919&title='+encodeURIComponent('{new_addslashes($title)}')+'" title="分享到新浪微博" class="t1" target="_blank">&nbsp;</a>');</script>
            <script>document.write('<a href="http://www.douban.com/recommend/?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent('{new_addslashes($title)}')+'" title="分享到豆瓣" class="t2" target="_blank">&nbsp;</a>');</script>
            <script>document.write('<a href="http://share.renren.com/share/buttonshare.do?link='+encodeURIComponent(location.href)+'&title='+encodeURIComponent('{new_addslashes($title)}')+'" title="分享到人人" class="t3" target="_blank">&nbsp;</a>');</script>
            <script>document.write('<a href="http://www.kaixin001.com/repaste/share.php?rtitle='+encodeURIComponent('{new_addslashes($title)}')+'&rurl='+encodeURIComponent(location.href)+'&rcontent=" title="分享到开心网" class="t4" target="_blank">&nbsp;</a>');</script>
            <script>document.write('<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(location.href)+'" title="分享到QQ空间" class="t5" target="_blank">&nbsp;</a>');</script>

            <span id='favorite'>
		<a href="javascript:;" onclick="add_favorite('{addslashes($title)}');" class="t6">收藏</a>
	  </span>

        </div>
        <div class="bk10"></div>
        {if $allow_comment && module_exists('comment')}
        <iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>
        <div class="box">
            <h5>评论排行</h5>
            {pc:comment action="bang" siteid="$siteid" cache="3600"}
            <ul class="content list blue f14 row-2">
                {loop $data $r}
                <li>·<a href="{$r[url]}" target="_blank">{str_cut($r[title], 40)}</a><span>({$r[total]})</span></li>
                {/loop}
            </ul>
            {/pc}
        </div>
        {/if}
    </div>
    <div class="col-auto">
        <div class="box">
            <h5 class="title-2">频道总排行</h5>
            <ul class="content digg">
                {pc:content  action="hits" catid="$catid" num="10" order="views DESC" cache="3600"}
                {loop $data $r}
                <li><a href="{$r[url]}" target="_blank" title="{$r[title]}">{str_cut($r[title], 28, '')}</a></li>
                {/loop}
                {/pc}
            </ul>
        </div>
        <div class="bk10"></div>
        <div class="box">
            <h5 class="title-2">频道本月排行</h5>
            <ul class="content rank">
                {pc:content action="hits" catid="$catid" num="10" order="monthviews DESC" cache="3600"}
                {loop $data $r}
                <li><span>{number_format($r[monthviews])}</span><a href="{$r[url]}"{title_style($r[style])} class="title" title="{$r[title]}">{str_cut($r[title],56,'...')}</a></li>
                {/loop}
                {/pc}
            </ul>
        </div>
    </div>
</div>
<script src = "{JS_PATH}ueditor/ueditor.parse.js"></script >
<script>
    <!--
    function show_ajax(obj) {
        var keywords = $(obj).text();
        var offset = $(obj).offset();
        var jsonitem = '';
        $.getJSON("{APP_PATH}index.php?m=content&c=index&a=json_list&type=keyword&modelid={$modelid}&id={$id}&keywords="+encodeURIComponent(keywords),
            function(data){
                var j = 1;
                var string = "<div class='point key-float'><div style='position:relative'><div class='arro'></div>";
                string += "<a href='JavaScript:;' onclick='$(this).parent().parent().remove();' hidefocus='true' class='close'><span>关闭</span></a><div class='contents f12'>";
                if(data!=0) {
                    $.each(data, function(i,item){
                        j = i+1;
                        jsonitem += "<a href='"+item.url+"' target='_blank'>"+j+"、"+item.title+"</a><BR>";

                    });
                    string += jsonitem;
                } else {
                    string += '没有找到相关的信息！';
                }
                string += "</div><span class='o1'></span><span class='o2'></span><span class='o3'></span><span class='o4'></span></div></div>";
                $(obj).after(string);
                $('.key-float').mouseover(
                    function (){
                        $(this).siblings().css({"z-index":0})
                        $(this).css({"z-index":1001});
                    }
                )
                $(obj).next().css({ "left": +offset.left-100, "top": +offset.top+$(obj).height()+12});
            });
    }

    function add_favorite(title) {
        $.getJSON('{APP_PATH}api.php?op=add_favorite&title='+encodeURIComponent(title)+'&url='+encodeURIComponent(location.href)+'&'+Math.random()+'&callback=?', function(data){
            if(data.status==1)	{
                $("#favorite").html('收藏成功');
            } else {
                alert('请登录');
            }
        });
    }

    $(function(){
        $('#Article .content img').LoadImage(true, 660, 660,'{IMG_PATH}s_nopic.gif');
    })
    setTimeout(function(){uParse('#conform', {
        'highlightJsUrl':'{JS_PATH}ueditor/third-party/SyntaxHighlighter/shCore.js',
        'highlightCssUrl':'{JS_PATH}ueditor/third-party/SyntaxHighlighter/shCoreDefault.css'})
    },50);
    //-->
</script>

<script src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
{template "content","footer"}